<template>
  <div class="page-container">
    <ex_super_table_page v-bind="option" ref="SuperTablePage"
      >
    </ex_super_table_page>

    <appointmentSettings ref="appointmentSettingsRef"></appointmentSettings>
  </div>
</template>
<script>
import superTablePageFunction from '@/mixin/super-table-page-function';
import emitOnFunction from '@/mixin/emit-on-function';

import page_table_model_manage from '@/mixin/page_table_model_manage';
let emitKey = 'appointment>settings_list'

import appointmentSettings from '../component/appointmentSettings';
export default {
  title: '设置记录',
  mixins: [superTablePageFunction, emitOnFunction(emitKey), page_table_model_manage],
  components:{appointmentSettings},
  data() {
    return {
      selection: [],

      option: {
        search: {
          model: [
            { label: "设置人", key: "userName", },
            { label: "设置时间", key: "configDate", type: 'date-picker', attrs: { type: 'date' } },
          ],
        },
        table: {
          url: "/wms-api/inbound/WmsInboundScheduleConfigRpc/selectConfigLogPage.json",
          // urlDataHandle: this.dataHandle,

          model: this.option_table_model(),
        },
      },
    };
  },
  mounted(){
    // this.$emit('tagModifyLabel', {
    //   label: `${this.$tt('title_appointment_report_list')}`,
    // })
  },
  methods: {
    option_table_model() {
      return [
        // { type: 'selection', clickToggle: true, keyGroup: 'label_table_operate' },
        { key: 'gmtCreate', label: '设置时间','show-overflow-tooltip': true,
        formatter: (r, c, v, i) => this.$dateFormat(v)
        },
        { key: 'userName', label: '设置人','show-overflow-tooltip': true},
        { key: 'warehouseCapacity', label: '设置库容','show-overflow-tooltip': true},
        { key: 'warehouseScheduleTypeEnum', label: '排班制度','show-overflow-tooltip': true,
          formatter: (r,c,v) => this.$enumShow(v, "WarehouseScheduleTypeEnum"),
        },
        { key: 'schedulePeriodTypeEnum', label: '预约时效要求','show-overflow-tooltip': true,
          formatter: (r,c,v) => this.$enumShow(v, "SchedulePeriodTypeEnum"),
        },
        {
          type: 'operate',
          width: 160,
          fixed:"right",
          operate: [
            {
              label: "查看仓库操作货量",
              click: (row, i) => this.appointmentSettingsFn(row)
            },
          ]
        }
      ]
    },
    dataHandle(res) {
      return [{id:'1692123768287744001',code:'测试数据'}]
    },
    appointmentSettingsFn(row){
      this.$refs.appointmentSettingsRef.show({row})
    }
  }
};

</script>
<style></style>
